# 吃饭
import time
from multiprocessing import Process, Pool

my_list = []


def add_data():
    for i in range(6):
        my_list.append(i)
        time.sleep(0.3)
    print(my_list)


def read_data():
    for i in range(6):
        print(my_list)
        time.sleep(0.3)


if __name__ == '__main__':  # 主进程
    p1 = Process(target=add_data)
    p2 = Process(target=read_data)

    p1.start()
    p1.join()
    p2.start()
